import DateConvert from '../../atoms/date';
import { IData } from '../api/activity/avtivity.api';
import Infocontainer from './infocontainer';


export default function Info({ data }: { data: IData }) {
	return <>
		<div className='a'>
			<Infocontainer title='活动主题' value={data.theme} />
			<Infocontainer title='发起人' value={data.username} />
			<Infocontainer title='活动地点' value={data.place} />
			<Infocontainer title='活动开始时间' value={DateConvert(Number(data.starttime))} />
			<Infocontainer title='活动结束时间' value={DateConvert(Number(data.endtime))} />
			<Infocontainer title='报名截止时间' value={DateConvert(Number(data.bytime))} />
			<Infocontainer title='报名人数上限' value={data.maxnumber} />
			<Infocontainer title='活动费用' value={data.cost === 0 ? '免费' : data?.cost?.toString()} />
			<Infocontainer title='报名人数上限' value={data.maxnumber} />
			<Infocontainer title='活动说明' value={data.explain} />
			<style jsx>{`
			.a{
display:flex;
flex-direction: column;
padding:1rem;
}
			`}</style>
		</div>
	</>;
}
